home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-01-26 | 2.4 KB | 120 lines | [TEXT/KEEN] |
- BEGIN {
- print "x un., y = 0, z = \"0\", q = \"\":"
- print "w = 1, u = \"1\";"
- if (x =="" && x == 0)
- print "x not assigned to"
- if (x != 0 || x != "")
- print "x assigned to"
- y = 0
- if (y =="" && y == 0)
- print "y not assigned to"
- if (y != 0 || y != "")
- print "y assigned to"
- z = "0"
- if (z =="" && z == 0)
- print "z not assigned to"
- if (z != 0 || z != "")
- print "z assigned to"
- q = ""
- if (q =="" && q == 0)
- print "q not assigned to"
- if (q != 0 || q != "")
- print "q assigned to"
- w = 1
- if (w =="" && w == 0)
- print "w not assigned to"
- if (w != 0 || w != "")
- print "w assigned to"
- u = "1"
- if (u =="" && u == 0)
- print "u not assigned to"
- if (u != 0 || u != "")
- print "u assigned to"
- afun()
- exit
- print "x is not assigned to"
- if (x == 0)
- print "if (x == 0) works"
- else
- print "x does not compare to 0"
- if (x)
- print "if (x) works"
- if (!x)
- print "if (!x) works"
- if (x == "0")
- print "if (x == \"0\") works"
- if (x == "")
- print "if (x == \"\") works"
- y = 0
- print "y = 0;"
- if (y == 0)
- print "if (y == 0) works"
- else
- print "y does not compare to 0"
- if (y)
- print "if (y) works"
- if (!y)
- print "if (!y) works"
- if (y == "0")
- print "if (y == \"0\") works"
- if (y == "")
- print "if (y == \"\") works"
- z = "0"
- print "z = \"0\";"
- if (z == 0)
- print "if (z == 0) works"
- else
- print "z does not compare to 0"
- if (z)
- print "if (z) works"
- if (!z)
- print "if (!z) works"
- if (z == "0")
- print "if (z == \"0\") works"
- if (z == "")
- print "if (z == \"\") works"
- q = ""
- print "q = \"\";"
- if (q == 0)
- print "if (q == 0) works"
- else
- print "q does not compare to 0"
- if (q)
- print "if (q) works"
- if (!q)
- print "if (!q) works"
- if (q == "0")
- print "if (q == \"0\") works"
- if (q == "")
- print "if (q == \"\") works"
- ##y = ""
- ##z = "0"
- ##if (z == y)
- ## print "wow"
- ##afun()
- }
-
- function afun( x,y,z,q)
- {
- print "Locals:"
- if (x =="" && x == 0)
- print "x not assigned to"
- if (x != 0 || x != "")
- print "x assigned to"
- y = 0
- if (y =="" && y == 0)
- print "y not assigned to"
- if (y != 0 || y != "")
- print "y assigned to"
- z = "0"
- if (z =="" && z == 0)
- print "z not assigned to"
- if (z != 0 || z != "")
- print "z assigned to"
- q = ""
- if (q =="" && q == 0)
- print "q not assigned to"
- if (q != 0 || q != "")
- print "q assigned to"
- }
-